package com.tengju.user.domain.service;

import com.tengju.user.domain.shared.ElasticsearchIndexNameEnum;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilder;

import java.util.List;

/**
 * @Author: 李大仙
 * @Date: 2021/5/11 10:50 上午
 */
public interface UserDocumentTemplate {

    void update(ElasticsearchIndexNameEnum indexNameEnum, String id, String json);

    <T> List<T> search(ElasticsearchIndexNameEnum indexNameEnum, SearchSourceBuilder builder, Class<T> clazz);

    long count(ElasticsearchIndexNameEnum indexNameEnum, QueryBuilder builder);
}
